package com.gjm.demo.service;

import com.gjm.demo.dao.UserInfoDao;
import com.gjm.demo.mapper.UserInfoMapper;
import com.gjm.demo.model.UserInfo;
import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserInfoService {

    @Autowired
    private UserInfoMapper userInfoMapper;

    @Autowired
    private UserInfoDao userInfoDao;

    @Autowired
    private ArticleInfoService articleInfoService;

    public List<UserInfo> getUserInfoByID(Integer id) {
        return userInfoMapper.selectInfoWithId2(id);
    }

    public UserInfo returnAuthorMessage() {
        UserInfo userInfo = userInfoMapper.selectInfoWithId3(userInfoDao.returnUid());
        return userInfo;
    }

}
